package com.exam.service.impl;

import com.exam.dao.ExamMenageMapper;
import com.exam.pojo.ExamManage;
import com.exam.service.ExamMenageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ExamMenageServiceImpl implements ExamMenageService {

    @Autowired
    private ExamMenageMapper examMenageMapper;

    @Override
    public ExamManage findById(int examCode) {
        return examMenageMapper.selectById(examCode);
    }

    @Override
    public int insertById(ExamManage examManage) {
        return examMenageMapper.insert(examManage);
    }

    @Override
    public int deleteById(int examCode) {
        return examMenageMapper.deleteById(examCode);
    }

    @Override
    public int updateById(ExamManage examManage) {
        return examMenageMapper.updateById(examManage);
    }

    @Override
    public List<ExamManage> getExamMangeAll() {
        return examMenageMapper.selectList(null);
    }
}
